package com.company;

import java.util.Scanner;

public class Main36 {
    public static void main(String[] args) {
        Scanner sr=new Scanner(System.in);
        int n,y;
        System.out.println("输入年月");
        n=sr.nextInt();
        y=sr.nextInt();
         if(y==2){
             if (n%4==0&&!(n%100==0)) System.out.println("29天");
         }else if(y==2)System.out.println("28天");
         if(y==1||y==3||y==5||y==7||y==8||y==10||y==12)
             System.out.println("31天");
         else if(y!=2){
             System.out.println("30天");
         }


    }
}
